
<?php $this->headScript()->appendFile($this->JS_PATH . "blog.js"); ?>
<?php $this->headScript()->appendFile($this->BASE_URL . "library/ckeditor/ckeditor.js"); ?>
<?php $this->headScript()->appendFile($this->BASE_URL . "library/ckeditor/adapters/jquery.js"); ?>

<script>
 var UNIQUEIDENTIFIER = '<?php echo $this->UNIQUEIDENTIFIER; ?>';
</script>

<div id="blog-listing"></div>
<div class="container-fluid">
    <div id="pad-wrapper" class="form-page">
        <div class="row-fluid form-wrapper">
            <div class="span column">
                <?php if ($this->successmessage != ""): ?>
                    <div class="alert alert-success">
                        <i class="icon-ok-sign"></i> <?php echo $this->successmessage; ?>
                    </div>
                <?php endif; ?>

                <?php if (count($this->errorMessageArray) > 0): ?>
                    <div class="alert alert-error">
                        <?php foreach ($this->errorMessageArray as $erroValue): ?>

                            <div class="text-left">
                                <i class="icon-remove-sign"></i>
                                <?php echo $erroValue; ?>
                            </div>

                        <?php endforeach; ?>
                    </div>
                <?php endif; ?>
                <form role="form"  id="blog-form" name="blog-form"  enctype="multipart/form-data"  action="" method="post">
				
					<div class="span column">
							<h3>Add Blog</h3>
							<br>
						</div>
					
					<input type="hidden" name="UNIQUEIDENTIFIER" value="<?php echo $this->UNIQUEIDENTIFIER; ?>" />
                    <div class="field-box">
                        <label>Title <span class="error-star">*</span>:</label>
                        <?php echo $this->form->blog_title; ?>
                    </div>


                    <div class="field-box">
                        <label>Short Description :</label>
                        <?php echo $this->form->blog_shortdescription; ?>
                    </div>

                    <div class="field-box">
                        <label>Description :</label>
                        <?php echo $this->form->blog_description; ?>
                    </div>
                    </br>

                    <!--<div class="field-box">
                        <label>Video Link <span class="error-star"></span>:</label>
                        <?php echo $this->form->blog_video; ?>
                    </div>-->

                    <div class="field-box">
                        <label>Image:</label>
                        <?php if ($this->imageName != ""): ?>

                            <?php if (file_exists($this->UPLOAD_PATH . "blog/" . $this->imageName)): ?>

                                <?php
                                $src_path = $this->PUBLIC_PATH . "upload/blog/" . $this->imageName;
                                ?>
                                <img src="<?php echo $src_path; ?>" height="200" width="200"/>&nbsp;
                                <br>
                            <?php endif; ?>
                        <?php endif; ?>
                        <input type="file" name="blog_image" id="blog_image">  
                    </div>
                    <br/>
                   
                    <div class="field-box">
                        <label>Category <span class="error-star">*</span>:</label>
                        <?php echo $this->form->blog_cat_id; ?>
                    </div>
                    </br>

                   <!-- <div class="field-box">
                        <label>Tag <span class="error-star"></span>:</label>
                        <?php echo $this->form->bt_tag_id; ?>
                    </div>
                    </br>-->

                    <div class="field-box">
                        <label>Status <span class="error-star">*</span>:</label>
                        <?php echo $this->form->blog_status; ?>
                    </div>

                    <br><div class="field-box">
                        <?php echo $this->form->Save; ?>
                        <?php echo $this->form->Reset; ?> 
                    </div>
				</form>
            </div>
        </div>
    </div>
</div>